<!--
 * @Description: 
 * @Author: xiongkuobiao
 * @Date: 2023-06-06 17:09:44
 * @LastEditors: xiongkuobiao
 * @LastEditTime: 2023-06-06 17:18:40
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    /**
     * @file 返回一个 Promise，并在 ms 毫秒后 Promise 变为完成状态
     */

    function sleep(ms) {
        // 补全此处代码
        return new Promise(resovle => {
            setTimeout(() => {
                resovle()
            }, ms);
        })
    }

    async function main() {
        console.log('a')
        await sleep(1000);
        console.log('b');
        await sleep(1000);
        console.log('c');
    }
    main()


</script>

</html>